package com.lzy.permission.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="tb_role_resource")
public class RoleResource {

	@Id
	@Column(length=32)
	private String id ;
	
	@ManyToOne
	private Role role ;
	
	@ManyToOne
	private Resource resource ;

	public RoleResource() {
	}
	
	public RoleResource(String id, Role role, Resource resource) {
		this.id = id;
		this.role = role;
		this.resource = resource;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public Resource getResource() {
		return resource;
	}

	public void setResource(Resource resource) {
		this.resource = resource;
	}
	
	
}
